home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #11 / Amiga Plus CD - 2004 - No. 11.iso / AmiSoft / Dev / misc / LOCCounter.lha / LOCCounter / src / SourceCode.h < prev    next >
C/C++ Source or Header  |  2004-08-18  |  878b  |  46 lines

  1. #ifndef LOC_SOURCE_CODE_H
  2. #define LOC_SOURCE_CODE_H
  3. /****************************************************************************
  4. *
  5. * $RCSfile: SourceCode.h $
  6. * $Revision: 2.8 $
  7. * $Date: 2004/08/18 21:46:32 $
  8. * $Author: ssolie $
  9. *
  10. *****************************************************************************
  11. *
  12. * Copyright (c) 2004 Steven Solie.  All Rights Reserved.
  13. *
  14. *****************************************************************************
  15. *
  16. * SourceCode component
  17. */
  18.  
  19. #include "Main.h"
  20.  
  21. #include <vector>
  22.  
  23.  
  24. class FileCount;
  25.  
  26. class SourceCode {
  27. public:
  28.     SourceCode(FileCount& fc);
  29.     ~SourceCode();
  30.     void load();
  31.     void count();
  32. private:
  33.     void removeComments();
  34.     void eatWhite();
  35. private:
  36.     FileCount& m_file_count;
  37.     char m_line_buf[MAX_LINE_LEN + 1];
  38.     bool m_in_comment;
  39.     char* m_source_buf;
  40.     int32 m_source_size;     // size in bytes
  41.     std::vector<char*> m_lines;
  42. };
  43.  
  44.  
  45. #endif
  46.